using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace CR.Domain.Entities
{
    /// <summary>
    /// 养殖信息表
    /// </summary>
    [Table("BreedingInfo")]
    public class BreedingInfo
    {
        /// <summary>
        /// 主键
        /// </summary>
        [Key]
        public Guid Id { get; set; }

        /// <summary>
        /// 溯源管理编号
        /// </summary>
        [Required]
        [StringLength(50)]
        public string TraceabilityCode { get; set; }

        /// <summary>
        /// 品种
        /// </summary>
        [StringLength(50)]
        public string Breed { get; set; }

        /// <summary>
        /// 来源
        /// </summary>
        [StringLength(100)]
        public string Source { get; set; }

        /// <summary>
        /// 养殖场地
        /// </summary>
        [StringLength(100)]
        public string BreedingSite { get; set; }

        /// <summary>
        /// 开始养殖日期
        /// </summary>
        public DateTime StartDate { get; set; }

        /// <summary>
        /// 结束养殖日期
        /// </summary>
        public DateTime? EndDate { get; set; }

        /// <summary>
        /// 饲养天数
        /// </summary>
        public int BreedingDays { get; set; }

        /// <summary>
        /// 饲料品牌
        /// </summary>
        [StringLength(50)]
        public string FeedBrand { get; set; }

        /// <summary>
        /// 养殖环境描述
        /// </summary>
        [StringLength(500)]
        public string EnvironmentDescription { get; set; }

        /// <summary>
        /// 饲养负责人
        /// </summary>
        [StringLength(30)]
        public string ResponsiblePerson { get; set; }

        /// <summary>
        /// 出栏日期
        /// </summary>
        public DateTime? MarketingDate { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedAt { get; set; } = DateTime.Now;

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? UpdatedAt { get; set; }

        /// <summary>
        /// 逻辑删除(0-未删除，1-已删除)
        /// </summary>
        public int IsDeleted { get; set; } = 0;
    }
} 